<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	template="/templates/general.xhtml">

	<ui:define name="title">
		<h:outputText value="#{menu['user.congresses.list']}" />
	</ui:define>
	<ui:define name="content">
		<h:form>

			<p:dataTable var="con" value="#{congressBean.lazyModelData}"
				paginator="true" rows="10" lazy="true" dynamic="true"
				paginatorTemplate=" {RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink} "
				rowsPerPageTemplate="5,10,15,20"
				selection="#{congressBean.congress}" selectionMode="single"
				onRowSelectComplete="congressDialog.show()" rowSelectListener="#{congressBean.selectCongress}"
				onRowSelectUpdate="displayCongress">

				<f:facet name="header">
					<h:outputText value="#{menu['user.congresses.list']}" />
				</f:facet>

				<p:column sortBy="#{con.name}" filterBy="#{con.name}">
					<f:facet name="header">
						<h:outputText value="#{domain['congress.name']}" />
					</f:facet>
					<h:outputText value="#{con.name}" />
				</p:column>

				<p:column sortBy="#{con.location}" filterBy="#{con.location}">
					<f:facet name="header">
						<h:outputText value="#{domain['congress.location']}" />
					</f:facet>
					<h:outputText value="#{con.location}" />
				</p:column>

				<p:column sortBy="#{con.matter}" filterBy="#{con.matter}">
					<f:facet name="header">
						<h:outputText value="#{domain['congress.matter']}" />
					</f:facet>
					<h:outputText value="#{con.matter}" />
				</p:column>

				<p:column sortBy="#{con.opening}">
					<f:facet name="header">
						<h:outputText value="#{domain['congress.opening']}" />
					</f:facet>
					<h:outputText value="#{con.opening}">
						<f:convertDateTime pattern="dd/MM/yyyy" />
					</h:outputText>
				</p:column>
			</p:dataTable>
		</h:form>
		<ui:include src="/templates/congressDialog.xhtml" />
	</ui:define>

</ui:composition>